import request from "@/utils/request.js";
/**
 * 列表查询
 * @param params
 */
export const agencyPage = query => {
  return request({
    url: `/mall/agent/agency/manage/page`,
    method: "get",
    params: query
  });
};
/**
 * 添加一级渠道
 * @param params
 */
export const addAgency = data => {
  return request({
    url: "/mall/agent/agency/manage/add",
    method: "post",
    data
  });
};

/**
 * 查询渠道详情
 * @param params
 */
export const agencyDetail = agentTenantId => {
  return request({
    url: `/mall/agent/agency/manage/detail/${agentTenantId}`,
    method: "get"
  });
};

/**
 * 编辑渠道
 * @param params
 */
export const edit = data => {
  return request({
    url: `/mall/agent/agency/manage/edit/${data.agentTenantId}`,
    method: "post",
    data
  });
};

/**
 * 查询家装通开拓人员
 * @param params
 */
export const supplyChainList = query => {
  return request({
    url: `/purchase/supplyChain/manage/select/list`,
    method: "get",
    params: query
  });
};
